Integrand size = 24, antiderivative size = 205 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {1155 a^8 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {1155 i a^8 \sec (c+d x)}{8 d}+\frac {22 i a^3 \cos (c+d x) (a+i a \tan (c+d x))^5}{3 d}-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}+\frac {33 i a^2 \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^3}{4 d}+\frac {77 i \sec (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )^2}{4 d}+\frac {385 i \sec (c+d x) \left (a^8+i a^8 \tan (c+d x)\right )}{8 d} \]
1155/8*a^8*arctanh(sin(d*x+c))/d+1155/8*I*a^8*sec(d*x+c)/d+22/3*I*a^3*cos( d*x+c)*(a+I*a*tan(d*x+c))^5/d-2/3*I*a*cos(d*x+c)^3*(a+I*a*tan(d*x+c))^7/d+ 33/4*I*a^2*sec(d*x+c)*(a^2+I*a^2*tan(d*x+c))^3/d+77/4*I*sec(d*x+c)*(a^4+I* a^4*tan(d*x+c))^2/d+385/8*I*sec(d*x+c)*(a^8+I*a^8*tan(d*x+c))/d
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1540\) vs. \(2(205)=410\).
Time = 8.30 (sec) , antiderivative size = 1540, normalized size of antiderivative = 7.51 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx =\text {Too large to display} \]
(-1155*Cos[8*c]*Cos[c + d*x]^8*Log[Cos[c/2 + (d*x)/2] - Sin[c/2 + (d*x)/2] ]*(a + I*a*Tan[c + d*x])^8)/(8*d*(Cos[d*x] + I*Sin[d*x])^8) + (1155*Cos[8* c]*Cos[c + d*x]^8*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]]*(a + I*a*Ta n[c + d*x])^8)/(8*d*(Cos[d*x] + I*Sin[d*x])^8) + (Cos[3*d*x]*Cos[c + d*x]^ 8*(((-32*I)/3)*Cos[5*c] - (32*Sin[5*c])/3)*(a + I*a*Tan[c + d*x])^8)/(d*(C os[d*x] + I*Sin[d*x])^8) + (Cos[d*x]*Cos[c + d*x]^8*((160*I)*Cos[7*c] + 16 0*Sin[7*c])*(a + I*a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d*x])^8) + (((1 155*I)/8)*Cos[c + d*x]^8*Log[Cos[c/2 + (d*x)/2] - Sin[c/2 + (d*x)/2]]*Sin[ 8*c]*(a + I*a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d*x])^8) - (((1155*I)/ 8)*Cos[c + d*x]^8*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]]*Sin[8*c]*(a + I*a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d*x])^8) + (Cos[c + d*x]^8*Se c[c]*(((236*I)/3)*Cos[8*c] + (236*Sin[8*c])/3)*(a + I*a*Tan[c + d*x])^8)/( d*(Cos[d*x] + I*Sin[d*x])^8) + (Cos[c + d*x]^8*(-160*Cos[7*c] + (160*I)*Si n[7*c])*Sin[d*x]*(a + I*a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d*x])^8) + (Cos[c + d*x]^8*((32*Cos[5*c])/3 - ((32*I)/3)*Sin[5*c])*Sin[3*d*x]*(a + I *a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d*x])^8) + (Cos[c + d*x]^8*(Cos[8 *c]/16 - (I/16)*Sin[8*c])*(a + I*a*Tan[c + d*x])^8)/(d*(Cos[d*x] + I*Sin[d *x])^8*(Cos[c/2 + (d*x)/2] - Sin[c/2 + (d*x)/2])^4) - (I*Cos[c + d*x]^8*(( 4*Cos[8*c])/3 - ((4*I)/3)*Sin[8*c])*Sin[(d*x)/2]*(a + I*a*Tan[c + d*x])^8) /(d*(Cos[c/2] - Sin[c/2])*(Cos[d*x] + I*Sin[d*x])^8*(Cos[c/2 + (d*x)/2]...
Time = 1.01 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.05, number of steps used = 14, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {3042, 3977, 3042, 3977, 3042, 3979, 3042, 3979, 3042, 3979, 3042, 3967, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^8}{\sec (c+d x)^3}dx\) |
\(\Big \downarrow \) 3977 |
\(\displaystyle -\frac {11}{3} a^2 \int \cos (c+d x) (i \tan (c+d x) a+a)^6dx-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \int \frac {(i \tan (c+d x) a+a)^6}{\sec (c+d x)}dx-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3977 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \int \sec (c+d x) (i \tan (c+d x) a+a)^4dx-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \int \sec (c+d x) (i \tan (c+d x) a+a)^4dx-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3979 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \int \sec (c+d x) (i \tan (c+d x) a+a)^3dx+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \int \sec (c+d x) (i \tan (c+d x) a+a)^3dx+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3979 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \int \sec (c+d x) (i \tan (c+d x) a+a)^2dx+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \int \sec (c+d x) (i \tan (c+d x) a+a)^2dx+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3979 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \left (\frac {3}{2} a \int \sec (c+d x) (i \tan (c+d x) a+a)dx+\frac {i \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{2 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \left (\frac {3}{2} a \int \sec (c+d x) (i \tan (c+d x) a+a)dx+\frac {i \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{2 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \left (\frac {3}{2} a \left (a \int \sec (c+d x)dx+\frac {i a \sec (c+d x)}{d}\right )+\frac {i \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{2 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \left (\frac {3}{2} a \left (a \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {i a \sec (c+d x)}{d}\right )+\frac {i \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{2 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {11}{3} a^2 \left (-9 a^2 \left (\frac {7}{4} a \left (\frac {5}{3} a \left (\frac {i \sec (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{2 d}+\frac {3}{2} a \left (\frac {a \text {arctanh}(\sin (c+d x))}{d}+\frac {i a \sec (c+d x)}{d}\right )\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}\right )+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^3}{4 d}\right )-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^5}{d}\right )-\frac {2 i a \cos ^3(c+d x) (a+i a \tan (c+d x))^7}{3 d}\) |
(((-2*I)/3)*a*Cos[c + d*x]^3*(a + I*a*Tan[c + d*x])^7)/d - (11*a^2*(((-2*I )*a*Cos[c + d*x]*(a + I*a*Tan[c + d*x])^5)/d - 9*a^2*(((I/4)*a*Sec[c + d*x ]*(a + I*a*Tan[c + d*x])^3)/d + (7*a*(((I/3)*a*Sec[c + d*x]*(a + I*a*Tan[c + d*x])^2)/d + (5*a*((3*a*((a*ArcTanh[Sin[c + d*x]])/d + (I*a*Sec[c + d*x ])/d))/2 + ((I/2)*Sec[c + d*x]*(a^2 + I*a^2*Tan[c + d*x]))/d))/3))/4)))/3
3.1.92.3.1 Defintions of rubi rules used
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^( n - 1)/(f*m)), x] - Simp[b^2*((m + 2*n - 2)/(d^2*m)) Int[(d*Sec[e + f*x]) ^(m + 2)*(a + b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && GtQ[n, 1] && ((IGtQ[n/2, 0] && ILtQ[m - 1/2, 0]) || (EqQ[n, 2] && LtQ[m, 0]) || (LeQ[m, -1] && GtQ[m + n, 0]) || (ILtQ[m, 0] & & LtQ[m/2 + n - 1, 0] && IntegerQ[n]) || (EqQ[n, 3/2] && EqQ[m, -2^(-1)])) && IntegerQ[2*m]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] + Simp[a*((m + 2*n - 2)/(m + n - 1)) Int[(d*Se c[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && GtQ[n, 0] && NeQ[m + n - 1, 0] && IntegersQ [2*m, 2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 253.24 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.72
method | result | size |
risch | \(-\frac {32 i a^{8} {\mathrm e}^{3 i \left (d x +c \right )}}{3 d}+\frac {160 i a^{8} {\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {i a^{8} \left (2295 \,{\mathrm e}^{7 i \left (d x +c \right )}+5855 \,{\mathrm e}^{5 i \left (d x +c \right )}+5153 \,{\mathrm e}^{3 i \left (d x +c \right )}+1545 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {1155 a^{8} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {1155 a^{8} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) | \(147\) |
derivativedivides | \(\frac {a^{8} \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {56 i a^{8} \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}-28 a^{8} \left (\frac {\sin ^{7}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{2}+\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{6}+\frac {5 \sin \left (d x +c \right )}{2}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-8 i a^{8} \left (\frac {\sin ^{8}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {5 \left (\sin ^{8}\left (d x +c \right )\right )}{3 \cos \left (d x +c \right )}-\frac {5 \left (\frac {16}{5}+\sin ^{6}\left (d x +c \right )+\frac {6 \left (\sin ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\sin ^{2}\left (d x +c \right )\right )}{5}\right ) \cos \left (d x +c \right )}{3}\right )+70 a^{8} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-\frac {8 i a^{8} \left (\cos ^{3}\left (d x +c \right )\right )}{3}-\frac {28 a^{8} \left (\sin ^{3}\left (d x +c \right )\right )}{3}+56 i a^{8} \left (\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )+\frac {a^{8} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(409\) |
default | \(\frac {a^{8} \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {56 i a^{8} \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}-28 a^{8} \left (\frac {\sin ^{7}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{2}+\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{6}+\frac {5 \sin \left (d x +c \right )}{2}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-8 i a^{8} \left (\frac {\sin ^{8}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {5 \left (\sin ^{8}\left (d x +c \right )\right )}{3 \cos \left (d x +c \right )}-\frac {5 \left (\frac {16}{5}+\sin ^{6}\left (d x +c \right )+\frac {6 \left (\sin ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\sin ^{2}\left (d x +c \right )\right )}{5}\right ) \cos \left (d x +c \right )}{3}\right )+70 a^{8} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-\frac {8 i a^{8} \left (\cos ^{3}\left (d x +c \right )\right )}{3}-\frac {28 a^{8} \left (\sin ^{3}\left (d x +c \right )\right )}{3}+56 i a^{8} \left (\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )+\frac {a^{8} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(409\) |
-32/3*I/d*a^8*exp(3*I*(d*x+c))+160*I/d*a^8*exp(I*(d*x+c))+1/12*I*a^8/d/(ex p(2*I*(d*x+c))+1)^4*(2295*exp(7*I*(d*x+c))+5855*exp(5*I*(d*x+c))+5153*exp( 3*I*(d*x+c))+1545*exp(I*(d*x+c)))+1155/8/d*a^8*ln(exp(I*(d*x+c))+I)-1155/8 /d*a^8*ln(exp(I*(d*x+c))-I)
Time = 0.25 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.39 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {-256 i \, a^{8} e^{\left (11 i \, d x + 11 i \, c\right )} + 2816 i \, a^{8} e^{\left (9 i \, d x + 9 i \, c\right )} + 18414 i \, a^{8} e^{\left (7 i \, d x + 7 i \, c\right )} + 33726 i \, a^{8} e^{\left (5 i \, d x + 5 i \, c\right )} + 25410 i \, a^{8} e^{\left (3 i \, d x + 3 i \, c\right )} + 6930 i \, a^{8} e^{\left (i \, d x + i \, c\right )} + 3465 \, {\left (a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{8}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3465 \, {\left (a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{8}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{24 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
1/24*(-256*I*a^8*e^(11*I*d*x + 11*I*c) + 2816*I*a^8*e^(9*I*d*x + 9*I*c) + 18414*I*a^8*e^(7*I*d*x + 7*I*c) + 33726*I*a^8*e^(5*I*d*x + 5*I*c) + 25410* I*a^8*e^(3*I*d*x + 3*I*c) + 6930*I*a^8*e^(I*d*x + I*c) + 3465*(a^8*e^(8*I* d*x + 8*I*c) + 4*a^8*e^(6*I*d*x + 6*I*c) + 6*a^8*e^(4*I*d*x + 4*I*c) + 4*a ^8*e^(2*I*d*x + 2*I*c) + a^8)*log(e^(I*d*x + I*c) + I) - 3465*(a^8*e^(8*I* d*x + 8*I*c) + 4*a^8*e^(6*I*d*x + 6*I*c) + 6*a^8*e^(4*I*d*x + 4*I*c) + 4*a ^8*e^(2*I*d*x + 2*I*c) + a^8)*log(e^(I*d*x + I*c) - I))/(d*e^(8*I*d*x + 8* I*c) + 4*d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) + 4*d*e^(2*I*d*x + 2*I*c) + d)
Time = 0.46 (sec) , antiderivative size = 277, normalized size of antiderivative = 1.35 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {1155 a^{8} \left (- \frac {\log {\left (e^{i d x} - i e^{- i c} \right )}}{8} + \frac {\log {\left (e^{i d x} + i e^{- i c} \right )}}{8}\right )}{d} + \frac {2295 i a^{8} e^{7 i c} e^{7 i d x} + 5855 i a^{8} e^{5 i c} e^{5 i d x} + 5153 i a^{8} e^{3 i c} e^{3 i d x} + 1545 i a^{8} e^{i c} e^{i d x}}{12 d e^{8 i c} e^{8 i d x} + 48 d e^{6 i c} e^{6 i d x} + 72 d e^{4 i c} e^{4 i d x} + 48 d e^{2 i c} e^{2 i d x} + 12 d} + \begin {cases} \frac {- 32 i a^{8} d e^{3 i c} e^{3 i d x} + 480 i a^{8} d e^{i c} e^{i d x}}{3 d^{2}} & \text {for}\: d^{2} \neq 0 \\x \left (32 a^{8} e^{3 i c} - 160 a^{8} e^{i c}\right ) & \text {otherwise} \end {cases} \]
1155*a**8*(-log(exp(I*d*x) - I*exp(-I*c))/8 + log(exp(I*d*x) + I*exp(-I*c) )/8)/d + (2295*I*a**8*exp(7*I*c)*exp(7*I*d*x) + 5855*I*a**8*exp(5*I*c)*exp (5*I*d*x) + 5153*I*a**8*exp(3*I*c)*exp(3*I*d*x) + 1545*I*a**8*exp(I*c)*exp (I*d*x))/(12*d*exp(8*I*c)*exp(8*I*d*x) + 48*d*exp(6*I*c)*exp(6*I*d*x) + 72 *d*exp(4*I*c)*exp(4*I*d*x) + 48*d*exp(2*I*c)*exp(2*I*d*x) + 12*d) + Piecew ise(((-32*I*a**8*d*exp(3*I*c)*exp(3*I*d*x) + 480*I*a**8*d*exp(I*c)*exp(I*d *x))/(3*d**2), Ne(d**2, 0)), (x*(32*a**8*exp(3*I*c) - 160*a**8*exp(I*c)), True))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 352 vs. \(2 (169) = 338\).
Time = 0.29 (sec) , antiderivative size = 352, normalized size of antiderivative = 1.72 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {128 i \, a^{8} \cos \left (d x + c\right )^{3} + 448 \, a^{8} \sin \left (d x + c\right )^{3} + 896 i \, {\left (\cos \left (d x + c\right )^{3} - \frac {3}{\cos \left (d x + c\right )} - 6 \, \cos \left (d x + c\right )\right )} a^{8} + 128 i \, {\left (\cos \left (d x + c\right )^{3} - \frac {9 \, \cos \left (d x + c\right )^{2} - 1}{\cos \left (d x + c\right )^{3}} - 9 \, \cos \left (d x + c\right )\right )} a^{8} + 896 i \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a^{8} + {\left (16 \, \sin \left (d x + c\right )^{3} - \frac {6 \, {\left (13 \, \sin \left (d x + c\right )^{3} - 11 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 105 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 105 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 144 \, \sin \left (d x + c\right )\right )} a^{8} + 112 \, {\left (4 \, \sin \left (d x + c\right )^{3} - \frac {6 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 24 \, \sin \left (d x + c\right )\right )} a^{8} + 560 \, {\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} a^{8} + 16 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{8}}{48 \, d} \]
-1/48*(128*I*a^8*cos(d*x + c)^3 + 448*a^8*sin(d*x + c)^3 + 896*I*(cos(d*x + c)^3 - 3/cos(d*x + c) - 6*cos(d*x + c))*a^8 + 128*I*(cos(d*x + c)^3 - (9 *cos(d*x + c)^2 - 1)/cos(d*x + c)^3 - 9*cos(d*x + c))*a^8 + 896*I*(cos(d*x + c)^3 - 3*cos(d*x + c))*a^8 + (16*sin(d*x + c)^3 - 6*(13*sin(d*x + c)^3 - 11*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 105*log(sin(d *x + c) + 1) + 105*log(sin(d*x + c) - 1) + 144*sin(d*x + c))*a^8 + 112*(4* sin(d*x + c)^3 - 6*sin(d*x + c)/(sin(d*x + c)^2 - 1) - 15*log(sin(d*x + c) + 1) + 15*log(sin(d*x + c) - 1) + 24*sin(d*x + c))*a^8 + 560*(2*sin(d*x + c)^3 - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1) + 6*sin(d*x + c) )*a^8 + 16*(sin(d*x + c)^3 - 3*sin(d*x + c))*a^8)/d
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2835 vs. \(2 (169) = 338\).
Time = 1.35 (sec) , antiderivative size = 2835, normalized size of antiderivative = 13.83 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=\text {Too large to display} \]
1/98304*(763587*a^8*e^(28*I*d*x + 14*I*c)*log(I*e^(I*d*x + I*c) + 1) + 106 90218*a^8*e^(26*I*d*x + 12*I*c)*log(I*e^(I*d*x + I*c) + 1) + 69486417*a^8* e^(24*I*d*x + 10*I*c)*log(I*e^(I*d*x + I*c) + 1) + 277945668*a^8*e^(22*I*d *x + 8*I*c)*log(I*e^(I*d*x + I*c) + 1) + 764350587*a^8*e^(20*I*d*x + 6*I*c )*log(I*e^(I*d*x + I*c) + 1) + 1528701174*a^8*e^(18*I*d*x + 4*I*c)*log(I*e ^(I*d*x + I*c) + 1) + 2293051761*a^8*e^(16*I*d*x + 2*I*c)*log(I*e^(I*d*x + I*c) + 1) + 2293051761*a^8*e^(12*I*d*x - 2*I*c)*log(I*e^(I*d*x + I*c) + 1 ) + 1528701174*a^8*e^(10*I*d*x - 4*I*c)*log(I*e^(I*d*x + I*c) + 1) + 76435 0587*a^8*e^(8*I*d*x - 6*I*c)*log(I*e^(I*d*x + I*c) + 1) + 277945668*a^8*e^ (6*I*d*x - 8*I*c)*log(I*e^(I*d*x + I*c) + 1) + 69486417*a^8*e^(4*I*d*x - 1 0*I*c)*log(I*e^(I*d*x + I*c) + 1) + 10690218*a^8*e^(2*I*d*x - 12*I*c)*log( I*e^(I*d*x + I*c) + 1) + 2620630584*a^8*e^(14*I*d*x)*log(I*e^(I*d*x + I*c) + 1) + 763587*a^8*e^(-14*I*c)*log(I*e^(I*d*x + I*c) + 1) + 14956128*a^8*e ^(28*I*d*x + 14*I*c)*log(I*e^(I*d*x + I*c) - 1) + 209385792*a^8*e^(26*I*d* x + 12*I*c)*log(I*e^(I*d*x + I*c) - 1) + 1361007648*a^8*e^(24*I*d*x + 10*I *c)*log(I*e^(I*d*x + I*c) - 1) + 5444030592*a^8*e^(22*I*d*x + 8*I*c)*log(I *e^(I*d*x + I*c) - 1) + 14971084128*a^8*e^(20*I*d*x + 6*I*c)*log(I*e^(I*d* x + I*c) - 1) + 29942168256*a^8*e^(18*I*d*x + 4*I*c)*log(I*e^(I*d*x + I*c) - 1) + 44913252384*a^8*e^(16*I*d*x + 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 44913252384*a^8*e^(12*I*d*x - 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 29942...
Time = 8.75 (sec) , antiderivative size = 343, normalized size of antiderivative = 1.67 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {\frac {1147\,a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{4}+\frac {a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,3505{}\mathrm {i}}{4}-\frac {5639\,a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{3}-a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,3585{}\mathrm {i}+\frac {25993\,a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{6}+\frac {a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,33847{}\mathrm {i}}{6}-4575\,a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,12041{}\mathrm {i}}{3}+\frac {27565\,a^8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{12}+\frac {a^8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,4293{}\mathrm {i}}{4}-\frac {1360\,a^8}{3}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,3{}\mathrm {i}+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,13{}\mathrm {i}-18\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,22{}\mathrm {i}+22\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,18{}\mathrm {i}-13\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,7{}\mathrm {i}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}+\frac {1155\,a^8\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \]
((27565*a^8*tan(c/2 + (d*x)/2)^2)/12 - (a^8*tan(c/2 + (d*x)/2)^3*12041i)/3 - 4575*a^8*tan(c/2 + (d*x)/2)^4 + (a^8*tan(c/2 + (d*x)/2)^5*33847i)/6 + ( 25993*a^8*tan(c/2 + (d*x)/2)^6)/6 - a^8*tan(c/2 + (d*x)/2)^7*3585i - (5639 *a^8*tan(c/2 + (d*x)/2)^8)/3 + (a^8*tan(c/2 + (d*x)/2)^9*3505i)/4 + (1147* a^8*tan(c/2 + (d*x)/2)^10)/4 - (1360*a^8)/3 + (a^8*tan(c/2 + (d*x)/2)*4293 i)/4)/(d*(3*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2)^2*7i - 13*tan(c/2 + (d *x)/2)^3 + tan(c/2 + (d*x)/2)^4*18i + 22*tan(c/2 + (d*x)/2)^5 - tan(c/2 + (d*x)/2)^6*22i - 18*tan(c/2 + (d*x)/2)^7 + tan(c/2 + (d*x)/2)^8*13i + 7*ta n(c/2 + (d*x)/2)^9 - tan(c/2 + (d*x)/2)^10*3i - tan(c/2 + (d*x)/2)^11 + 1i )) + (1155*a^8*atanh(tan(c/2 + (d*x)/2)))/(4*d)